using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._OrthoMapping
{
    /// <summary>
    /// <para>Analyze Control Points</para>
    /// <para>Analyzes the control point
    /// coverage and identifies the areas that need
    /// additional control points to improve the block adjust result.</para>
    /// <para>分析控制点
    /// 覆盖范围并确定需要的区域
    /// 额外的控制点，以改善块调整结果。</para>
    /// </summary>    
    [DisplayName("Analyze Control Points")]
    public class AnalyzeControlPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AnalyzeControlPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Input Mosaic Dataset</para>
        /// <para>The input mosaic dataset against which to analyze the control points.</para>
        /// <para>用于分析控制点的输入镶嵌数据集。</para>
        /// </param>
        /// <param name="_in_control_points">
        /// <para>Input Control Points</para>
        /// <para><xdoc>
        ///   <para>The input control point feature class.</para>
        ///   <para>It is normally created from the Compute Tie Points or the Compute Control Points tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入控制点要素类。</para>
        ///   <para>它通常由计算连接点或计算控制点工具创建。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_coverage_table">
        /// <para>Output Control Point Coverage Feature Class</para>
        /// <para>A polygon feature class output that contains the control point coverage and the percentage of the area within the corresponding image.</para>
        /// <para>包含控制点覆盖率和相应影像中面积百分比的面要素类输出。</para>
        /// </param>
        public AnalyzeControlPoints(object _in_mosaic_dataset, object _in_control_points, object _out_coverage_table)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
            this._in_control_points = _in_control_points;
            this._out_coverage_table = _out_coverage_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Analyze Control Points";

        public override string CallName => "management.AnalyzeControlPoints";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _in_control_points, _out_coverage_table, _out_overlap_table, _in_mask_dataset, _minimum_area, _maximum_level];

        /// <summary>
        /// <para>Input Mosaic Dataset</para>
        /// <para>The input mosaic dataset against which to analyze the control points.</para>
        /// <para>用于分析控制点的输入镶嵌数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Input Control Points</para>
        /// <para><xdoc>
        ///   <para>The input control point feature class.</para>
        ///   <para>It is normally created from the Compute Tie Points or the Compute Control Points tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入控制点要素类。</para>
        ///   <para>它通常由计算连接点或计算控制点工具创建。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Control Points")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_control_points { get; set; }


        /// <summary>
        /// <para>Output Control Point Coverage Feature Class</para>
        /// <para>A polygon feature class output that contains the control point coverage and the percentage of the area within the corresponding image.</para>
        /// <para>包含控制点覆盖率和相应影像中面积百分比的面要素类输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Control Point Coverage Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_coverage_table { get; set; }


        /// <summary>
        /// <para>Output Overlap Feature Class</para>
        /// <para>A polygon feature class output that contains all the overlap areas between images.</para>
        /// <para>包含影像之间所有重叠区域的面要素类输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Overlap Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_overlap_table { get; set; } = null;


        /// <summary>
        /// <para>Input Mask</para>
        /// <para><xdoc>
        ///   <para>A polygon feature class used to exclude areas that you do not want in the analysis of the control points computation.</para>
        ///   <para>A field with a name of mask can control the inclusion or exclusion of areas. A value of 1 indicates that the areas defined by the polygons (inside) will be excluded from the computation. A value of 2 indicates the defined polygons (inside) will be included in the computation while areas outside of the polygons will be excluded.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个面要素类，用于排除在控制点计算分析中不需要的区域。</para>
        ///   <para>名称为掩码的字段可以控制区域的包含或排除。值为 1 表示由多边形（内部）定义的区域将从计算中排除。值为 2 表示定义的多边形（内部）将包含在计算中，而多边形外部的区域将被排除。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Mask")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_mask_dataset { get; set; } = null;


        /// <summary>
        /// <para>Minimum Overlap Area</para>
        /// <para><xdoc>
        ///   <para>Specify the minimum percent that the overlap area must be, in relation to the image. Areas that are lower than the specified percent threshold will be excluded from the analysis.</para>
        ///   <para>Ensure that you do not have areas that are too small; otherwise, you will have small slivers being analyzed.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定重叠面积相对于图像必须达到的最小百分比。低于指定百分比阈值的区域将从分析中排除。</para>
        ///   <para>确保您没有太小的区域;否则，您将分析小条子。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Overlap Area")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _minimum_area { get; set; } = 0.2;


        /// <summary>
        /// <para>Maximum Overlap Level</para>
        /// <para><xdoc>
        ///   <para>The maximum number of images that can be overlapped when analyzing the control points.</para>
        ///   <para>For example, if there are four images in your mosaic dataset, and a maximum overlap value of 3 was specified, then there are ten different combinations that will appear in the Overlap Window. If the four images were named i1, i2, i3, and i4, the ten combinations that would appear are [i1, i2, i3], [i1 i2 i4], [i1 i3 i4], [i2 i3 i4], [i1, i2], [i1, i3], [i1, i4], [i2, i3], [i2, i4], and [i3, i4].</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>分析控制点时可以重叠的最大图像数。</para>
        ///   <para>例如，如果镶嵌数据集中有 4 个影像，并且指定了最大重叠值 3，则重叠窗口中将显示 10 种不同的组合。如果这四个图像被命名为 i1、i2、i3 和 i4，则将出现的十个组合是 [i1， i2， i3]、[i1 i2 i4]、[i1 i3 i4]、[i2 i3 i4]、[i1， i2]、[i1， i3]、[i1， i4]、[i2， i3]、[i2， i4] 和 [i3， i4]。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Overlap Level")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _maximum_level { get; set; } = 2;


        public AnalyzeControlPoints SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}